<script>
  var x = 3;
  var y = 4;

  var z = x;
  x=y;
  y=z;
  
  alert(x);
  alert(y);


</script>